﻿
using bitzhuwei.Compiler;
using bitzhuwei.PreDirectiveFormat;
using System.Diagnostics;
using System.Text;

namespace bitzhuwei.PreDirectiveFormat {
    /// <summary>
    /// preprocessor context.
    /// </summary>
    public partial class PpContext {
        /// <summary>
        /// #line lineNumber fileNumber
        /// </summary>
        public int currentLine = 1;// experiment shows it starts from 1
        /// <summary>
        /// #line lineNumber fileNumber
        /// </summary>
        public int currentFile = 0;

        /// <summary>
        /// #if #ifdef #ifndef #elif #else #endif
        /// </summary>
        public bool isActive = true;

        /// <summary>
        /// <see cref="PreDefine.name"/> -> <see cref="PreDefine"/>
        /// </summary>
        public readonly Dictionary<string, PreDefine> name2Define = new();

        public List<IfElifsElseEnd> conditionalObjs = new();

    }
}
